{extend name="layouts/iframe" /}

{block name="pagecss"}

{/block}

{block name="content"}
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body" style="padding: 15px;">
            <form class="layui-form" action="">
                <div class="layui-form-item">
                    <label class="layui-form-label"><span class="required">*</span>是否启用</label>
                    <div class="layui-input-block">
                        <input type="checkbox" name="status" {if ($info.status == 1) }checked=""{/if} lay-skin="switch" lay-text="启用|禁用">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"><span class="required">*</span>角色名称</label>
                    <div class="layui-input-block">
                        <input type="text" class="layui-input" name="name" value="{{$info.name}}" maxlength="12" lay-verify="required" placeholder="请输入" autocomplete="off">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">备注</label>
                    <div class="layui-input-block">
                        <textarea class="layui-textarea" name="remark" maxlength="100" placeholder="100字以内">{{$info.remark}}</textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">后台权限</label>
                    <div id="role_tree" class="layui-input-block">

                    </div>
                    <!--<input type="hidden" class="role_auth" name="role_auth" value="">-->
                </div>

                <input type="hidden" name="id" value="{{$info.id}}">

                <div class="layui-form-item layui-layout-admin">
                    <div class="layui-input-block">
                        <div class="layui-footer" style="left: 0;">
                            <button type="button" class="layui-btn layui-btn-primary close-btn">取消</button>
                            <button type="button" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="laySave">保存 <i class="layui-icon layui-icon-release"></i></button>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

<input type="hidden" class="check_name_url" value="{{:url('/'.strtolower($model).'/checkName')}}">
<input type="hidden" class="save_url" value="{{:url('/'.strtolower($model).'/editpost')}}">
<input type="hidden" class="getMenus_url" value="{{:url('/'.strtolower($model).'/getmenus')}}">
{/block}

{block name="pagescript"}
<script src="{{:asset('__STATIC__/admin/pages/js/adminrole.js')}}" type="text/javascript"></script>
{/block}